<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <h:head>
        <title>Search Page</title>
        <h:outputStylesheet library="css" name="stylesheet.css" />
    </h:head>
    <h:body>
        <header>
            <h1 id="title">MeteoCal</h1>
            <h:form id="searchForm" class="float-left">
                <p:inputText value="#{searchBean.searchInput}" id="keyword" maxlength="200"/>
                <p:commandButton class="searchUsersButton" action="#{searchBean.findUser()}" icon="ui-icon-search"/>
                <p:watermark for="keyword" value="Search..." id="watermark" />
                <p:dataTable var="user" value="#{searchBean.usersSearched}"
                             id="searchResultTable" style="font-size:15px;text-align:center;width:1024px;margin-left:13%;position:absolute;top:60px;left:0px;border-bottom:solid 1px black;">
                    <p:column headerText="Email">
                        <h:outputText value="#{user.email}" />
                    </p:column>
                    
                    <p:column headerText="Name">
                        <h:outputText value="#{user.name}" />
                    </p:column>

                    <p:column headerText="Surname">
                        <h:outputText value="#{user.surname}" />
                    </p:column>
                    
                    <p:column headerText="" style="background:none;border:none;">
                        <p:commandButton action="#{searchBean.selectUser(user)}"
                                       value="Go To Calendar"
                                       style="margin:0;"/>
                    </p:column>
                </p:dataTable>
            </h:form>
            <ul id="landmarks">
                <li><p:link outcome="home" value="#{homeBean.name}'s Calendar"/></li>
                <li><p:link outcome="notifications" value="Notifications (#{notificationBean.getNumberOfNotifies()})"/></li>
                <li><p:link outcome="addressbook" value="Addressbook"/></li>
                <li><p:link outcome="settings" value="Settings"/></li>
                <li><h:form><p:commandLink action="#{indexBean.logout()}" value="Logout"/></h:form></li>
            </ul>
        </header>
        <section>
        </section>
    </h:body>
</html>

